function [r_, beta_, lambda_, logL_] = quickTA_fit(data)% function [r_, beta_, lambda_, logL_] = quickTA_fit(data)%% data is [cohs times correct] x trials%if nargin < 1 | isempty(data)  return;endglobal DATADATA = data;clear data;% generate guessq_guess = [10 1 0];%% Use fmincon to find the fitquickF = fmincon('quickTA_err', q_guess, [], [], [], [], [0.1; 0; 0.01], ...					  [1000; 100; 0.99], [], optimset('LargeScale', 'off'));r_ 	   = quickF(1);beta_ 	= quickF(2);lambda_ 	= quickF(3);logL_ 	= quickTA_err(quickF);